@extends('wap.layouts.master')
@section('title')
	@if ($_GET['state']==1)
		操作成功
	@elseif ($_GET['state']==2)
		操作失败
	@endif
@endsection

@section('content')

<div class="aw-main aw-user-msg">
	<div class="aw-msg">
		@if ($_GET['state']==1)
			<div class="aw-msg-icon">
				<i class="aw-icon aw-icon-operation aw-icon-operation-success"></i>
			</div>
			<div class="aw-msg-title">@{{info.title}}</div>
		@elseif ($_GET['state']==2)
			<div class="aw-msg-icon">
				<i class="aw-icon aw-icon-operation aw-icon-operation-fail"></i>
			</div>
			<div class="aw-msg-title">@{{info.title}}</div>
		@endif
		<div class="aw-msg-info">@{{info.info}}</div>
		<div class="aw-msg-btn"><button v-on:click="Submit_Click" type="submit" class="aw-assest-btn aw-btn-bordercolor-lvse aw-btn-radius">确 认</button></div>
	</div>
</div>

@section('pagejs')
@parent
<script type="text/javascript">
var MJS_URLArry=URLArry;
var Get_form={
	state:2,title:'操作失败',info:'',order_type:'',url:'',
}
$.extend(Get_form,MJS_URLArry);
//订单类型 1约战 2应战 3普通订场
if(Get_form.state==1){
	if(MJS_URLArry.order_type){
		Get_form.url='/wap/order/list';
	}
	if(Get_form.order_type==1){
		Get_form.title='发布成功';
		Get_form.info='您已成功发布需求，正在为您寻找对手！';
	}else if(Get_form.order_type==2){
		Get_form.title='应战成功';
		Get_form.info='您已成功下达战书，对手还有30秒到达战场。';
	}else if(Get_form.order_type==3){
		Get_form.title='预订成功';
		Get_form.info='您已经成功预订球场，祝您玩的尽兴~！';
	}
}else if(Get_form.state==2){
	if(Get_form.order_type==1){
		Get_form.title='发布失败';
		Get_form.info='发布需求是啊不，请重新发布！';
	}else if(Get_form.order_type==2){
		Get_form.title='应战失败';
		Get_form.info='战书下达失败，请重新下战书！';
	}else if(Get_form.order_type==3){
		Get_form.title='预订失败';
		Get_form.info='预订球场失败，请重新预订！';
	}
}
var vm=new Vue({
	el:'#Vue-body',
	data:{info:Get_form},
	methods:{
		Submit_Click:function(){
			if(this.info.url){
				location.href=this.info.url;
			}else{
				window.history.go(-1);//返回上一页
			}
		}
	}
})
</script>
@endsection

@endsection

